package com.example.lxq.demo.controller;

import java.util.List;

import com.example.lxq.demo.entities.Carousel;
import com.example.lxq.demo.service.CarouselService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {
    
    @Autowired
    CarouselService carouselService;

    @GetMapping("index")
    public String index(){
        return "I love you❤❤❤❤❤❤❤❤";
    }

    @GetMapping("carousel")
    public List<Carousel> testCarousel(){
        return carouselService.carousels();
    }

}
